import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 引入amfe-flexible移动端适配插件
import 'amfe-flexible'
// 引入vant
// import { NavBar } from 'vant'
import '@/utils/vant.js'
// 测试接口
// import { allChannelListAPI } from '@/api'
// Vue.use(NavBar)
// 引入自定义指令
import focus from './utils/directive.js'
Vue.use(focus)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  beforeCreate () {
    Vue.prototype.$bus = this
  },
  render: (h) => h(App)

}).$mount('#app')

// 测试接口
/* const Myfn = async () => {
  try {
    await allChannelListAPI()
  } catch (error) {
    // promise抛出的错误
    console.dir(error)
  }
}
console.log(Myfn()) // Promise{<pending>} */
